package edu.ycu.aladdin.web.dto.tripartite;

import com.alibaba.fastjson.JSONObject;
import edu.ycu.aladdin.web.dto.ThirdUserInfoObtainable;
import lombok.Data;

/**
 * @author <a href="mailto:wangruihuan@abitai.com">王瑞环</a>
 * @since 2019-01-18 6:09 PM
 */
@Data
public class GithubUserInfo implements ThirdUserInfoObtainable {

    private String gists_url;
    private String repos_url;
    private Boolean two_factor_authentication;
    private String following_url;
    private Object bio;
    private String created_at;
    private String login;
    private String type;
    private String blog;
    private Integer private_gists;
    private Integer total_private_repos;
    private String subscriptions_url;
    private String updated_at;
    private Boolean site_admin;
    private Integer disk_usage;
    private Integer collaborators;
    private String company;
    private Integer owned_private_repos;
    private Integer id;
    private Integer public_repos;
    private String gravatar_id;
    private Plan plan;
    private String email;
    private String organizations_url;
    private Object hireable;
    private String starred_url;
    private String followers_url;
    private Integer public_gists;
    private String url;
    private String received_events_url;
    private Integer followers;
    private String avatar_url;
    private String events_url;
    private String html_url;
    private Integer following;
    private String name;
    private Object location;
    private String node_id;

    @Override
    public JSONObject getThirdUserInfo() {
        return (JSONObject) JSONObject.toJSON(this);
    }

    @Override
    public String getName2Show(){
        return name;
    }

    @Data
    class Plan{

        private Integer private_repos;
        private String name;
        private Integer collaborators;
        private Integer space;
    }
}
